package tech.wangpai.domain;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.StringJoiner;

/**
 * 用户对象
 */
public class User {
    /**
     * 用户编号.
     */
    private String userId;
    /**
     * 用户名称.
     */
    private String username;
    /**
     * 用户密码.
     */
    private String password;
    /**
     * 用户年龄.
     */
    private Integer age;
    /**
     * 用户分数.
     */
    private BigDecimal score;
    /**
     * 用户生日
     */
    private LocalDate birthday;

    public User() {
    }

    public User(String userId, String username, String password, Integer age, BigDecimal score) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.age = age;
        this.score = score;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public BigDecimal getScore() {
        return score;
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", User.class.getSimpleName() + "[", "]")
                .add("userId='" + userId + "'")
                .add("username='" + username + "'")
                .add("password='" + password + "'")
                .add("age=" + age)
                .add("score=" + score)
                .add("birthday=" + birthday)
                .toString();
    }
}
